<?php
namespace App\Http\Controllers;

class UserController extends Controller {


    //登陆页
    public function login() {
        return view('User/login');
    }

    //登陆接口
    public function register() {
        return ['code' => 200];
    }

    //用户首页
    public function index() {
        return view('User/index');
    }

    //查询用水
    public function search() {
        return view('User/list');
    }

    //后台首页
    public function main() {
        return view('User/main');
    }

    //用户充值
    public function recharge() {
        return view('User/recharge');
    }

    //用户提交充值
    public function postRecharge() {
        return ['code' => 200];
    }

    //查询列表
    public function getSearchList() {
        $data = [
            ['username' => '111', 'louhao' => '111#123', 'month' => 1, 'price' => 123],
            ['username' => '111', 'louhao' => '111#123', 'month' => 1, 'price' => 123],
        ];
        return ['code' => 0, 'msg' => '', 'count' => 3, 'data' => $data];
    }
}